package top.syfy.jwt.jwtdemo.exception;

import lombok.Data;
import top.syfy.jwt.jwtdemo.message.CodeEnum;

/**
 * 自定义异常
 *
 * @author syfy
 * @date 2021/03/05
 */
@SuppressWarnings({"all"})
@Data
public class CustomerException extends RuntimeException {

	private static final long serialVersionUID = -6105799599145376417L;

	/**
	 * 状态码
	 */
	private Integer code;

	public CustomerException(CodeEnum codeEnum) {
		super(codeEnum.getMsg());
		this.code = codeEnum.getCode();
	}

}
